{% extends 'base.twig' %}

{% block head %}
	<script type="text/javascript" src="/content/js/ckeditor/ckeditor.js"></script>
	<script type="text/javascript" src="/content/js/ckeditor/adapters/jquery.js"></script>

	<script type="text/javascript">
		$(function () {
			$('#inputContent').ckeditor();
		});
	</script>
{% endblock %}

{% block content %}
	<form action="/content/apply?page={{ page.page|url_encode }}" method="post" role="form">
		<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-save"></span> Сохранить</button>
		<br><br>
		<div class="form-group">
			<label for="inputTitle">Заголовок (title):</label>
			<input name="title" class="form-control" id="inputTitle" value="{{ page.title|escape }}">
		</div>
		<div class="form-group">
			<label for="inputDescription">Описание (description):</label>
			<input name="description" class="form-control" id="inputDescription" value="{{ page.description|escape }}">
		</div>
		<div class="form-group">
			<label for="inputKeywords">Ключевые слова (keywords):</label>
			<input name="keywords" class="form-control" id="inputKeywords" value="{{ page.keywords|escape }}">
		</div>
		<div class="form-group">
			<label for="inputContent">Контент:</label>
			<textarea name="content" class="form-control" id="inputContent">{{ page.content }}</textarea>
		</div>

	</form>
{% endblock %}